from OCC.Core.BRepBuilderAPI import BRepBuilderAPI_MakeEdge, BRepBuilderAPI_MakeWire
from OCC.Core.gp import gp_Pnt, gp_Ax2, gp_Dir, gp_Elips

location = gp_Pnt(0, 0, 0)
axis = gp_Dir(0, 0, 1)

ellipseAxis = gp_Ax2(location, axis)
ellipseAxis0 = gp_Elips(ellipseAxis, 9, 3)
ellipseAxis1 = BRepBuilderAPI_MakeEdge(ellipseAxis0)
ellipseAxis = BRepBuilderAPI_MakeWire(ellipseAxis1.Edge())

if __name__ == "__main__":
    from OCC.Display.SimpleGui import init_display

    display, start_display, add_menu, add_function_to_menu = init_display()
    display.DisplayShape(ellipseAxis.Edge(), update=True)
    start_display()
